<%@ page contentType="text/html; charset=utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="tags" tagdir="/WEB-INF/tags" %>
<html>
<body>
<form id="form1" name="form1" method="post" action="../room/log_operation.do" style="padding:0 0 10px 0">
	房间ID:<input type="text" name="roomId" id="roomId" value="${roomId}" />
	管理员ID:<input type="text" name="adminId" id="adminId" value="${adminId}" />
	<div class="datepicker input-append">
		<input data-format="yyyy-MM-dd" name="beginDate" value="${beginDate}"  type="text"></input>
		<span class="add-on">
			<i data-time-icon="icon-time" data-date-icon="icon-calendar"></i>
		</span>
	</div>
	<div class="datepicker input-append">
		<input data-format="yyyy-MM-dd" name="endDate" value="${endDate}" type="text"></input>
		<span class="add-on">
			<i data-time-icon="icon-time" data-date-icon="icon-calendar"></i>
		</span>
	</div> &nbsp;&nbsp;&nbsp;&nbsp;
	<input type="submit" name="button" id="button" value="查询" class="btn"/>
</form>
<table class="table table-bordered">
  <thead>
    <tr style=" background-color:#CCCCFF">
      <th>操作时间</th>
      <th>房间: 管理员昵称</th>
      <th>管理员ID</th>
      <th>操作</th>
      <th>被管制用户昵称</th>
      <th>被管制用户ID</th>
    </tr>
  </thead>
  <tbody>
  <c:if test="${list.size() == 0}"><td colspan="5">没有查询到数据.</td></c:if>
  <c:forEach var="logs" items="${list}">
    <tr>
      <td><c:if test="${logs.atTime != null}"><fmt:formatDate value="${logs.atTime}" pattern="yyyy-MM-dd HH:mm:ss"/></c:if></td>
      <td>${logs.sceneId}: <tags:user id="${logs.playerId}"/></td>
	  <td>${logs.playerId}</td>
      <td>
		<c:if test="${logs.adminType == 0}">解除管理员</c:if>
		<c:if test="${logs.adminType == 1}">禁言</c:if>
		<c:if test="${logs.adminType == 2}">踢出房间</c:if>
		<c:if test="${logs.adminType == 5}">加管理员</c:if>
	  </td>
      <td><tags:user id="${logs.affectedId}"/></td>
      <td>${logs.affectedId}</td>
    </tr>
  </c:forEach>
  </tbody>
</table>
</body>
</html>